package uk.ac.lkl.common.associator.ui;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;




public class HandleSet {

    private HashMap<Object, HandlePanel> leftHandles;

    private HashMap<Object, HandlePanel> rightHandles;


    public HandleSet() {
        this.leftHandles = new HashMap<Object, HandlePanel>();
        this.rightHandles = new HashMap<Object, HandlePanel>();
    }


    public void addLeftHandle(Object object, HandlePanel handlePanel) {
        leftHandles.put(object, handlePanel);
    }


    public void addRightHandle(Object object, HandlePanel handlePanel) {
        rightHandles.put(object, handlePanel);
    }


    public HandlePanel getLeftHandle(Object object) {
        return leftHandles.get(object);
    }


    public HandlePanel getRightHandle(Object object) {
        return rightHandles.get(object);
    }


    public Collection<HandlePanel> getLeftHandles() {
        return Collections.unmodifiableCollection(leftHandles.values());
    }


    public Collection<HandlePanel> getRightHandles() {
        return Collections.unmodifiableCollection(rightHandles.values());
    }
}

